package com.xiaomaoguai.springmvc.controller;

import java.util.Date;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description :
 * @FileName: RestController.java
 * @Author :WeiHui.Zhang
 * @Data : 2015年10月21日 上午11:22:24
 * @Version:V1.00
 */
@RestController
@RequestMapping("api")
public class RestControllerTest {

	@RequestMapping(value = "/getjson", produces = { "application/json;charset=UTF-8" })
	public final TestModel getJson() {
		return new TestModel("1", "jim", "1559018677", new Date());
	}

	@RequestMapping(value = "/getxml", produces = { "application/xml;charset=UTF-8" })
	public final TestModel getxml() {
		return new TestModel("1", "jimffff", "1559018677", new Date());
	}

}
